https://glot.io/snippets/g37ok3vi3q/raw/main.lua